
function saveModel(table){
	var columns = table.datagrid('options')['columns'][0];
	var rows = table.datagrid('getRows');
	var str=""
	for(var i=0;i<rows.length;i++){
		var seg="";
		for(var j=0;j<columns.length;j++){
			var f = columns[j]['field'];
			var v = rows[i][f];
			seg =seg + f+":"+v+";";
		}
		str = str+seg+"#";
	}
	$('#modelData').val(str);
	
	$('#saveModel').click();
	
	//$("<span style='border:1px solid'></span>").appendTo($('#modelMinPanel'));
}